#ifndef SCREENWIDGET_H
#define SCREENWIDGET_H

#include <QWidget>
#include <QTimer>

class QResizeEvent;
class TopMenuWidget;
class NormalScreen;

namespace Ui {
class ScreenWidget;
}

class QPropertyAnimation;

class ScreenWidget : public QWidget
{
    Q_OBJECT
    enum ShowMethod
    {

    };

public:
    explicit ScreenWidget(int wid, QWidget *parent = nullptr);
    ~ScreenWidget() override;
    NormalScreen* getScreen();
    const int emitHeight = 4;
signals:
    void Minimized();
    void NotMinimized();
protected:
    void changeEvent(QEvent *event) override;
    void resizeEvent(QResizeEvent *event) override;

protected slots:
    void menuEnter();
    void menuLeave();
    void setTopMenuPos(int parentWidth);

    void normal_slot();
    void full_slot();


private:
    Ui::ScreenWidget *ui;
    TopMenuWidget *m_topMenu;
    NormalScreen *m_screen;
    QPropertyAnimation *m_pPosAnimation1;
    QTimer m_timer;
    bool m_isFull;
    Qt::WindowStates m_oldWindowState;
};

#endif // SCREENWIDGET_H
